<?php

// picture uploader (user interface, pop-up window)

// digiboard by digitalboom.org
// http://www.digitalboom.org

// Information Technology program
// Sirindhorn International Institute of Technology
// Thammasat University, Rangsit Campus
// http://www.siit.tu.ac.th

// first created on: 2002 May 14
// last modified on: 2003 Sep 06 by bact'

include("settings/config.inc.php");

extract($_POST);
extract($_GET);

if (!isset($tcount)) 
  $tcount = 0;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>picture uploader 
  <?if( $Topic_ID == "0000" ) {?>
  (new topic)
  <?} else {?>
   (<?=$Topic_ID;?>)
  <?}?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$DGB["ENCODING"];?>">
<link rel="stylesheet" href="<?=$DGB["STYLESHEET"]?>" type="text/css">
</head>

<body bgcolor="#FFFFFF">
<table width="100%" border=0 cellspacing=0 cellpadding=0 valign=top align="center">
<tr bgcolor="#999999">
<td><img src="images/i_upload.gif" width=19 height=19 align="middle"> <font color="#ffffff"><b>picture uploader</b></font></td>
</tr>
 <tr>
  <td><font size=2><br>&nbsp;click 'Browse...' to choose picture(s) to send to
  <?if( $Topic_ID == "0000" ) {?>
  new topic
  <?} else {?>
   topic <?=$Topic_ID;?>
  <?}?>:<br>
  <font color="#666666">&nbsp;each picture not larger than <?=$DGB["UploadMaxSize"];?> bytes</font><br><br></font></td>
 </tr>
 <tr>
  <td align="center">
   <form enctype="multipart/form-data" action="upload.php" method="post">
   <input type="hidden" name="Topic_ID" value="<?=$Topic_ID;?>">
   <input type="hidden" name="tcount" value="<?=$tcount;?>">
   <? for($i=0; $i<$DGB["UploadMaxNum"]; $i++) { ?>
   <?=$i+1+$tcount;?>) <input type="file" name="userfile[]" size=25><br>
   <? } ?>
   <br>
   <input type="submit" name="submit" value="Send">
   <input type="reset" name="reset" value="Clear">
   </form>
  </td>
 </tr>
</table>
</body>
</html>